// 引用网络请求中间件
import request from '../../utils/request.js';

export default {
	/**
	 * @param {Object} data"address": "string",
	 * "consignee": "string",
	 * "phone": "string"
	 */
	addList(data) {
		return request({
			url: `/deliveryAddressApi/add`,
			method: 'POST',
			data
		})
	},
	/**
	 * @param {Object} data"ids": [
		"string"]
	 */
	deleteList() {
		return request({
			url: `/deliveryAddressApi/delete`,
			method: 'DELETE',
		})
	},

	getList() {
		return request({
			url: `/deliveryAddressApi/list`,
			method: 'GET',
		})
	},
	/**
	 * @param {Object} data"
	 * address": "string",
	 * "consignee": "string",
	 * "deliveryAddressId": "string",
	 *  "phone": "string"
	 */
	changeList(data) {
		return request({
			url: `/deliveryAddressApi/update`,
			method: 'PUT',
			data
		})
	},


}